package com.qys.livesMall.shortVideo.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.qys.livesMall.framework.view.BaseQuery;
import com.qys.livesMall.shortVideo.model.entity.H2ShortVideo;
import com.qys.livesMall.shortVideo.model.entity.ShortVideoHistory;
import com.qys.livesMall.shortVideo.model.vo.app.AppUserVideoHistoryVO;

import java.util.List;

/**
 * <p>
 * 用户浏览视频历史记录 服务类
 * </p>
 *
 * @author
 * @since 2023-05-30
 */
public interface ShortVideoHistoryService extends IService<ShortVideoHistory> {

    /**
     * 添加用户历史记录
     *
     * @param video  {@link  H2ShortVideo}
     * @param userId 用户Id
     */
    void save(H2ShortVideo video, Long userId);

    /**
     * 分页查询用户短视频浏览记录
     *
     * @param baseQuery
     */
    Page<AppUserVideoHistoryVO> page(BaseQuery baseQuery);


    /**
     * 根据用户id查询今日观看短视频的id集合
     * @param userId
     * @return
     */
    List<Long> watchTodayCollection(Long userId);
}
